package de.slothsoft.stube.util;

import java.text.MessageFormat;

public final class StubeUtil {

    public static final String ID_SAXONY = "sn";
    public static final String ID_BAVARIA = "by";
    protected static final String[] IDS = { ID_BAVARIA, ID_SAXONY };

    private static final String MAP_URL = "http://www.sachsens-stube.de/tools/maps-api/webapp/{0}.php";
    private static final String PLAYSTORE_URL = "http://play.google.com/store/apps/details?id=de.slothsoft.stube.{0}";

    private static final String MAP_URL_ALL = "http://www.sachsens-stube.de/tools/maps-api/webapp/index.php";

    public static String getMapUrl(String id) {
	if ("all".equals(id)) return MAP_URL_ALL;
	return MessageFormat.format(MAP_URL, id);
    }

    public static String getPlaystoreUrl(String id) {
	return MessageFormat.format(PLAYSTORE_URL, id);
    }

    public static String getWebsite(String id) {
	// if (ID_BAVARIA.equals(id)) return "http://www.bazi-stüble.de";
	if (ID_SAXONY.equals(id)) return "http://www.sachsens-stube.de";
	return "http://slothsoft.de";
    }

    private StubeUtil() {
	// hide me
    }

}
